/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package google;

/**
 *
 * @author nisarg
 */
public class store_credit {
    public static void main(String[] args) {
    	int credit = 100;
	int total = 3;
	int price[] = {5,75,25};
	int size = total;
	int temp = 0;
	int i;
	int pos1=0,pos2=0;
	for(i=0;i<size;i++) {
            for(int j=0;j<size;j++) {
                int t = price[i]+price[j];
		if( t > temp && t <= credit && i != j) {
                    temp = t;
                    pos1 = i + 1;
                    pos2 = j + 1;
		}
		}
	}
        System.out.println("Case#1: "+pos1 + " "+pos2);
    }
}
